import request from '@/utils/request'

export default{

    // 1. 添加小节
    addVideo(video){
        return request({
            url: `/eduservice/edu-video/addVideo`,
            method: 'post',
            data: video
          })
    },

    // 2.根据id回显小节数据
    getVideo(id){
        return request({
            url: `/eduservice/edu-video/getVideoInfo/${id}`,
            method: 'get',
          })
    },
    
    // 3.修改小节
    updateVideo(video){
        return request({
            url: `/eduservice/edu-video/updateVideo`,
            method: 'post',
            data: video
          })
    },

    // 4.删除小节
    deleteVideo(id){
        return request({
            url: `/eduservice/edu-video/${id}`,
            method: 'delete',
          })
    },

    // 5.删除阿里云的视频的方法
    deleteAliyunVod(id){
        return request({
            url: `/eduvod/video/removeAlyVideo/${id}`,
            method: 'delete',
          })
    },
}